Get the Details of Scripts from Library API

This API lets you get the details of scripts from library

GET/sm/v1/script-library/{id}

Input ParametersInput Parameters

Parameter

Mandatory/Optional

Data Type

Description

id

Mandatory

String

Provide Library ID for which you want to fetch the details from the script library

Authorization

Mandatory

String

Authorization token to authenticate to Qualys Enterprise TruRisk™ Platform

Sample: Get the details of the script from the script librarySample: Get the details of the script from the script library

API Request

curl -X GET
<qualys_base_url>/sm/v1/script-library/<Library-id> 
--header 'Content-Type: application/json' 
--header 'Authorization: Bearer <authToken>' 
--data '{"filter":"includeScriptContent" : true}'

Response

{
  "body": {
    "id": 18711,
    "title": "QID 91566 CVE-2019-9512 HTTPv2 Server DoS Vuln.ps1",
    "description": "To be fully protected from these vulnerabilities, an administrator must configure the server to limit the number of HTTPv2 packets by modifying the registry keys. This script performs the required post-patch action as recommended by MSRC.",
    "disclaimer": "THIS SCRIPT IS PROVIDED TO YOU \"AS IS.\" TO THE EXTENT PERMITTED BY LAW, QUALYS HEREBY DISCLAIMS ALL WARRANTIES AND LIABILITY FOR THE PROVISION OR USE OF THIS SCRIPT. IN NO EVENT SHALL THESE SCRIPTS BE DEEMED TO BE CLOUD SERVICES AS PROVIDED BY QUALYS.",
    "category": {
      "id": 0,
      "name": "Post Patch"
    },
    "platform": "WINDOWS",
    "lastUpdatedDateTime": 1688550457688,
    "severity": 0,
    "threshold": 0,
    "type": {
      "id": 1,
      "name": "Custom Script"
    },
    "language": {
      "id": 4,
      "name": "PowerShell-Script"
    },
    "created": {
      "dateTime": 1688550457688
    },
    "content": "JHJlZ2lzdfQoJfQo=",
    "versions": [
      {
        "version": "1",
        "path": "VMDR/Post Patch/Custom Script/Windows/PowerShell-Script/1/QID 91566 CVE-2019-9512 HTTPv2 Server DoS Vuln/QID 91566 CVE-2019-9512 HTTPv2 Server DoS Vuln.ps1",
        "sha": "a19327ce3132382f3ac0df1b8ac7fa2fae5cc181"
      }
    ],
    "importedFromScriptLibrary": true,
    "moduleCode": "VMDR",
    "vmdrScriptMetadata": {
      "name": "QID 91566 CVE-2019-9512 HTTPv2 Server DoS Vuln.ps1",
      "disclaimer": "THIS SCRIPT IS PROVIDED TO YOU \"AS IS.\" TO THE EXTENT P

To know the details of the response codes, refer to Appendix.